#ifndef __APP_MQTT_H__
#define __APP_MQTT_H__


typedef int (*messageArrive)(void*,char*,int);
/*mqtt配置宏定义*/
#define MQTT_CLIENT_SERVER_URI "ws://192.168.51.18:8083"
#define MQTT_CLIENT_ID "bde11a20-1b6e-11f0-b575-d765d8c8af93"
#define MQTT_SUB_TOPIC "Cherry/web_to_gateway"
#define MQTT_PUB_TOPIC "Cherry/gateway_to_web"
/*初始化一个mqtt客户端*/
int App_mqtt_Init(void);

/*撤销已建立的mqtt客户端*/
void App_mqtt_Deinit(void);

/*mqtt客户端发布消息*/
void App_mqtt_SendMsg(char* msg,int datalen);

/*注册接受信息事件的外部回调*/
void App_mqtt_Register_Callback(void* args,messageArrive cb_func);

#endif /* __APP_MQTT_H__ */